//
//  SpotDetailViewController.h
//  SXH
//
//  Created by 房 国生 on 15/6/25.
//  Copyright (c) 2015年 lyss. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>
#import "SpotEntity.h"
#import "ParkEntity.h"

#import "RightMenuViewController.h"
#import "DXSemiViewControllerCategory.h"
typedef void(^FinshBlock)();
typedef void(^ProgressValueBlock)(double progress);
typedef void(^NextBlock)(SpotEntity *entity);
typedef void(^PauseBlock)();
typedef void(^ResumeBlock)();
@interface SpotDetailViewController : BaseViewController<UIScrollViewDelegate>
{
    AVAudioPlayer *audioPlayer;
    NSMutableArray *musicArray;
    BOOL isCircle;
    BOOL musicTableViewHidden;
    float tempVolume;
    NSMutableArray *timeArray;
    NSMutableDictionary *LRCDictionary;
    NSUInteger lrcLineNumber;
    
    
}

@property (nonatomic,assign) BOOL isOK;
@property (nonatomic, strong) SpotEntity *entity;
@property (nonatomic, strong) ParkEntity *parkEntity;
@property (nonatomic, strong) NSMutableArray *musicArray;
@property (nonatomic, strong) IBOutlet UILabel *labelListTitle;

@property (nonatomic, strong) IBOutlet UITableView *tableViewSpot;
@property (nonatomic, strong) IBOutlet UIView *viewListSpot;
@property (nonatomic, strong) FinshBlock finshblock;
@property (nonatomic, strong) ProgressValueBlock progressValueBlock;
@property (nonatomic, strong) NextBlock nextBlock;
@property (nonatomic, strong) PauseBlock pauseBlock;
@property (nonatomic, strong) ResumeBlock resumeBlock;
@property (assign) BOOL isTap;
@property (assign) BOOL isPlay;
@property (assign) BOOL isPause;
@property (assign) BOOL reStart;
@property (assign) BOOL autoPlayFunction;
@property (assign) NSUInteger musicArrayNumber;
@property (nonatomic, strong)SpotEntity *currentSpot;
@property (assign) BOOL isAppear;
- (void) initMainView ;
- (void)initDate;

- (IBAction)aboveMusic:(id)sender;
- (IBAction)nextMusic:(id)sender;
+(instancetype)sharedInstance ;
- (IBAction)play:(id)sender;
- (void)stopAudio;

- (void)updatePlayerSetting;
-(void)pauseMusic;
-(void)playMusic;
-(void)playMusicProgress:(ProgressValueBlock)progressValueBlock finshBlock:(FinshBlock)finsh nextBlock:(NextBlock)nextBlock;
-(void)pauseImage:(PauseBlock )pauseBlock resume:(ResumeBlock)resumeBlock;
@property (nonatomic, strong) IBOutlet UITextView *textViewContent;

@property (strong, nonatomic) IBOutlet UIButton *playBtn;


@property (strong, nonatomic) IBOutlet UISlider *progressSlider;
- (IBAction)progressChange:(id)sender;

@property (strong, nonatomic) IBOutlet UISlider *soundSlider;
- (IBAction)soundChange:(id)sender;

- (IBAction)circle:(id)sender;
@property (strong, nonatomic) IBOutlet UIButton *circleBtn;

@property (strong, nonatomic) IBOutlet UILabel *currentTimeLabel;
@property (strong, nonatomic) IBOutlet UILabel *totalTimeLabel;

@property (strong, nonatomic) IBOutlet UITableView *musicTableView;

@property (strong, nonatomic) IBOutlet UITableView *lrcTableView;
//显示歌曲目录

- (IBAction)rightView:(id)sender;

- (void)playTable:(NSUInteger)tableNumber;

@end
